<nz-spin [nzSpinning]="isSpinning">

    <nz-collapseset nzAccordion>
      <nz-collapse [nzTitle]="'生产单位检查项目'" [nzActive]="true">
          <nz-table #nzTable [nzDataSource]="productList" nzSize="middle" [nzBordered]="true" [nzIsPagination]="false" (nzDataChange)="productdisplayDataChange($event)">
              <thead nz-thead>
                <tr>
                  <th nz-th [nzCheckbox]="true">
                    <label nz-checkbox [(ngModel)]="productallChecked" [nzIndeterminate]="productindeterminate" (ngModelChange)="productcheckAll($event)">
                    </label>
                  </th>
                  <th nz-th>
                    <span>检查项目</span>
                  </th>
                  <th nz-th>
                    <span>检查内容</span>
                  </th>
                </tr>
              </thead>
              <tbody nz-tbody>
                <tr nz-tbody-tr *ngFor="let data of productList">
                  <td nz-td [nzCheckbox]="true">
                    <label nz-checkbox [nzDisabled]="data.disabled" [(ngModel)]="data.checked" (ngModelChange)="productrefreshStatus($event)">
                    </label>
                  </td>
                  <td nz-td>{{data.itemName}}</td>
                  <td nz-td>{{data.itemContent}}</td>
                </tr>
              </tbody>
            </nz-table>
      </nz-collapse>
      <nz-collapse [nzTitle]="'使用单位检查项目'" [nzActive]="false">
          <nz-table #nzTable [nzDataSource]="usedList" nzSize="middle" [nzBordered]="true" [nzIsPagination]="false" (nzDataChange)="useddisplayDataChange($event)">
              <thead nz-thead>
                <tr>
                  <th nz-th [nzCheckbox]="true">
                    <label nz-checkbox [(ngModel)]="usedallChecked" [nzIndeterminate]="usedindeterminate" (ngModelChange)="usedcheckAll($event)">
                    </label>
                  </th>
                  <th nz-th>
                    <span>检查项目</span>
                  </th>
                  <th nz-th>
                    <span>检查内容</span>
                  </th>
                </tr>
              </thead>
              <tbody nz-tbody>
                <tr nz-tbody-tr *ngFor="let data of usedList">
                  <td nz-td [nzCheckbox]="true">
                    <label nz-checkbox [nzDisabled]="data.disabled" [(ngModel)]="data.checked" (ngModelChange)="usedrefreshStatus($event)">
                    </label>
                  </td>
                  <td nz-td>{{data.itemName}}</td>
                  <td nz-td>{{data.itemContent}}</td>
                </tr>
              </tbody>
            </nz-table>
      </nz-collapse>
      <nz-collapse [nzTitle]="'电梯检查项目'" [nzActive]="false">
          <nz-table #nzTable [nzDataSource]="elevatorList" nzSize="middle" [nzBordered]="true" [nzIsPagination]="false" (nzDataChange)="elevatordisplayDataChange($event)">
              <thead nz-thead>
                <tr>
                  <th nz-th [nzCheckbox]="true">
                    <label nz-checkbox [(ngModel)]="elevatorallChecked" [nzIndeterminate]="elevatorindeterminate" (ngModelChange)="elevatorcheckAll($event)">
                    </label>
                  </th>
                  <th nz-th>
                    <span>检查项目</span>
                  </th>
                  <th nz-th>
                    <span>检查内容</span>
                  </th>
                </tr>
              </thead>
              <tbody nz-tbody>
                <tr nz-tbody-tr *ngFor="let data of elevatorList">
                  <td nz-td [nzCheckbox]="true">
                    <label nz-checkbox [nzDisabled]="data.disabled" [(ngModel)]="data.checked" (ngModelChange)="elevatorrefreshStatus($event)">
                    </label>
                  </td>
                  <td nz-td>{{data.itemName}}</td>
                  <td nz-td>{{data.itemContent}}</td>
                </tr>
              </tbody>
            </nz-table>
      </nz-collapse>
      <nz-collapse [nzTitle]="'委托检测检查项目'" [nzActive]="false">
        <nz-collapseset>
        <nz-collapse [nzTitle]="'曳引与强制驱动电梯'" [nzActive]="false">
            <nz-table #nzTable [nzDataSource]="checkedList1" nzSize="middle" [nzBordered]="true" [nzIsPagination]="false" (nzDataChange)="checkeddisplayDataChange1($event)">
                <thead nz-thead>
                  <tr>
                    <th nz-th [nzCheckbox]="true">
                      <label nz-checkbox [(ngModel)]="checkedallChecked1" [nzIndeterminate]="checkedindeterminate1" (ngModelChange)="checkedcheckAll1($event)">
                      </label>
                    </th>
                    <th nz-th>
                      <span>序号</span>
                    </th>
                    <th nz-th>
                      <span>检验类别</span>
                    </th>
                    <th nz-th>
                      <span>检查项目及内容</span>
                    </th>
                  </tr>
                </thead>
                <tbody nz-tbody>
                  <tr nz-tbody-tr *ngFor="let data of checkedList1">
                    <td nz-td [nzCheckbox]="true">
                      <label nz-checkbox [nzDisabled]="data.disabled" [(ngModel)]="data.checked" (ngModelChange)="checkedrefreshStatus1($event)">
                      </label>
                    </td>
                    <td nz-td>{{data.itemNo}}</td>
                    <td nz-td>{{data.ext1}}</td>
                    <td nz-td>{{data.itemContent}}</td>
                  </tr>
                </tbody>
              </nz-table>
        </nz-collapse>
        <nz-collapse [nzTitle]="'自动扶梯与自动人行道'" [nzActive]="false">
            <nz-table #nzTable [nzDataSource]="checkedList2" nzSize="middle" [nzBordered]="true" [nzIsPagination]="false" (nzDataChange)="checkeddisplayDataChange2($event)">
                <thead nz-thead>
                  <tr>
                    <th nz-th [nzCheckbox]="true">
                      <label nz-checkbox [(ngModel)]="checkedallChecked2" [nzIndeterminate]="checkedindeterminate2" (ngModelChange)="checkedcheckAll2($event)">
                      </label>
                    </th>
                    <th nz-th>
                      <span>序号</span>
                    </th>
                    <th nz-th>
                      <span>检验类别</span>
                    </th>
                    <th nz-th>
                      <span>检查项目及内容</span>
                    </th>
                  </tr>
                </thead>
                <tbody nz-tbody>
                  <tr nz-tbody-tr *ngFor="let data of checkedList2">
                    <td nz-td [nzCheckbox]="true">
                      <label nz-checkbox [nzDisabled]="data.disabled" [(ngModel)]="data.checked" (ngModelChange)="checkedrefreshStatus2($event)">
                      </label>
                    </td>
                    <td nz-td>{{data.itemNo}}</td>
                    <td nz-td>{{data.ext1}}</td>
                    <td nz-td>{{data.itemContent}}</td>
                  </tr>
                </tbody>
              </nz-table>
        </nz-collapse>
        <nz-collapse [nzTitle]="'液压电梯'" [nzActive]="false">
            <nz-table #nzTable [nzDataSource]="checkedList3" nzSize="middle" [nzBordered]="true" [nzIsPagination]="false" (nzDataChange)="checkeddisplayDataChange3($event)">
                <thead nz-thead>
                  <tr>
                    <th nz-th [nzCheckbox]="true">
                      <label nz-checkbox [(ngModel)]="checkedallChecked3" [nzIndeterminate]="checkedindeterminate3" (ngModelChange)="checkedcheckAll3($event)">
                      </label>
                    </th>
                    <th nz-th>
                      <span>序号</span>
                    </th>
                    <th nz-th>
                      <span>检验类别</span>
                    </th>
                    <th nz-th>
                      <span>检查项目及内容</span>
                    </th>
                  </tr>
                </thead>
                <tbody nz-tbody>
                  <tr nz-tbody-tr *ngFor="let data of checkedList3">
                    <td nz-td [nzCheckbox]="true">
                      <label nz-checkbox [nzDisabled]="data.disabled" [(ngModel)]="data.checked" (ngModelChange)="checkedrefreshStatus3($event)">
                      </label>
                    </td>
                    <td nz-td>{{data.itemNo}}</td>
                    <td nz-td>{{data.ext1}}</td>
                    <td nz-td>{{data.itemContent}}</td>
                  </tr>
                </tbody>
              </nz-table>
        </nz-collapse>
        <nz-collapse [nzTitle]="'杂物电梯'" [nzActive]="false">
            <nz-table #nzTable [nzDataSource]="checkedList4" nzSize="middle" [nzBordered]="true" [nzIsPagination]="false" (nzDataChange)="checkeddisplayDataChange4($event)">
                <thead nz-thead>
                  <tr>
                    <th nz-th [nzCheckbox]="true">
                      <label nz-checkbox [(ngModel)]="checkedallChecked4" [nzIndeterminate]="checkedindeterminate4" (ngModelChange)="checkedcheckAll4($event)">
                      </label>
                    </th>
                    <th nz-th>
                      <span>序号</span>
                    </th>
                    <th nz-th>
                      <span>检验类别</span>
                    </th>
                    <th nz-th>
                      <span>检查项目及内容</span>
                    </th>
                  </tr>
                </thead>
                <tbody nz-tbody>
                  <tr nz-tbody-tr *ngFor="let data of checkedList4">
                    <td nz-td [nzCheckbox]="true">
                      <label nz-checkbox [nzDisabled]="data.disabled" [(ngModel)]="data.checked" (ngModelChange)="checkedrefreshStatus4($event)">
                      </label>
                    </td>
                    <td nz-td>{{data.itemNo}}</td>
                    <td nz-td>{{data.ext1}}</td>
                    <td nz-td>{{data.itemContent}}</td>
                  </tr>
                </tbody>
              </nz-table>
        </nz-collapse>
        </nz-collapseset>
      </nz-collapse>
      <nz-collapse [nzTitle]="'自定义检查项目'" [nzActive]="false">
          <ul nz-menu [nzMode]="'horizontal'">
              <li nz-menu-item (click)="addItem(title1, content1, footer1)">
                  <i class="anticon anticon-plus"></i>导入
              </li>
              <li nz-menu-item (click)="deleteItem()">
                  <i class="anticon anticon-delete"></i>删除
              </li>
          </ul>
          <nz-table #nzTable [nzDataSource]="selfList" nzSize="middle" [nzBordered]="true" [nzIsPagination]="false" (nzDataChange)="selfdisplayDataChange($event)">
              <thead nz-thead>
                <tr>
                  <th nz-th [nzCheckbox]="true">
                    <label nz-checkbox [(ngModel)]="selfallChecked" [nzIndeterminate]="selfindeterminate" (ngModelChange)="selfcheckAll($event)">
                    </label>
                  </th>
                  <th nz-th>
                    <span>检查项目</span>
                  </th>
                  <th nz-th>
                    <span>检查内容</span>
                  </th>
                </tr>
              </thead>
              <tbody nz-tbody>
                <tr nz-tbody-tr *ngFor="let data of selfList">
                  <td nz-td [nzCheckbox]="true">
                    <label nz-checkbox [nzDisabled]="data.disabled" [(ngModel)]="data.checked" (ngModelChange)="selfrefreshStatus($event)">
                    </label>
                  </td>
                  <td nz-td>{{data.itemName}}</td>
                  <td nz-td>{{data.itemContent}}</td>
                </tr>
              </tbody>
            </nz-table>
      </nz-collapse>
    </nz-collapseset>


  <form nz-form [formGroup]="validateForm">
    <div nz-form-item nz-row style="margin-bottom:8px;margin-top:20px;">
      <div nz-form-control nz-col [nzSpan]="2" [nzOffset]="8">
        <button nz-button [nzSize]="'large'" (click)="cancel($event)" [nzType]="'default'">取消</button>
      </div>
      <div nz-form-control nz-col [nzSpan]="2" [nzOffset]="4">
        <button nz-button [nzSize]="'large'" (click)="submitForm($event)" [nzType]="'primary'">确认</button>
      </div>
    </div>
  </form>


  <ng-template #title1>
    <span>请选择自定义添加检查内容清单</span>
</ng-template>
<ng-template #content1>
    <div>
    导入自定义检查内容：
    <nz-upload nzAction="{{config.IP+config.API.importSfcheckUploadExcel}}" [nzData]="inCheckItemData" (nzChange)="uploadChage($event)" [nzShowUploadList]="false">
        <button nz-button>
        <i class="anticon anticon-upload"></i>
        <span>导入</span>
        </button>
    </nz-upload>
    </div>
</ng-template>
<ng-template #footer1>
    <div>
    </div>
</ng-template>

</nz-spin>
